"""
访问首页网址
点击手机类型方法
"""
from common.base import Base, get_driver
from selenium.webdriver.common.by import By


class HomePage(Base):
    # 首页网址
    heme_url = "http://localhost:8080/ecshop/index.php"

    # 点击手机类型
    def click_phone_type(self):
        self.click((By.LINK_TEXT, '手机类型'))


if __name__ == '__main__':
    # 创建浏览器驱动
    driver = get_driver()
    home = HomePage(driver)
    # 访问目标网址
    home.get("http://localhost:8080/ecshop/index.php")
    home.click_phone_type()
    home.quit(2)


